package Swing;

import javax.swing.*;

public class HelloWorldSwing {
    private  static  void  createAndShowGUI(){

        JFrame.setDefaultLookAndFeelDecorated(true);

        //创建/设置窗口
        JFrame frame =new JFrame("HelloWorldSwing");
//        frame.getDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        //添加“hello world”标签
        JLabel label =new JLabel("hello world");
        frame.getContentPane().add(label);

        //显示窗口
        frame.pack();
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        //显示应用GUI
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {


            }
        });
    }

}
